<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class OpenSocialHttpRequest</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class OpenSocialHttpRequest</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Abstracts a request object to be sent to the OpenSocialHttpLib class.</p>
		<p class="notes">
			Located in <a class="field" href="_OpenSocialHttpRequest.php.html">/OpenSocialHttpRequest.php</a> (line <span class="field">34</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																																				
												<div class="method-definition">
											<span class="method-result">OpenSocialHttpRequest</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$method</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$url</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$signed_params</span> = <span class="var-default">null</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$body</span> = <span class="var-default">null</span>], <span class="var-type">body</span>&nbsp;<span class="var-name">$string</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getBody" title="details" class="method-name">getBody</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#getHeaders" title="details" class="method-name">getHeaders</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getMethod" title="details" class="method-name">getMethod</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getNormalizedUrl" title="details" class="method-name">getNormalizedUrl</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getParameter" title="details" class="method-name">getParameter</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getUrl" title="details" class="method-name">getUrl</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setParameter" title="details" class="method-name">setParameter</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setParameters" title="details" class="method-name">setParameters</a>
											(<span class="var-type">array</span>&nbsp;<span class="var-name">$parameters</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setRequestor" title="details" class="method-name">setRequestor</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$id</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#sign" title="details" class="method-name">sign</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$consumer</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$signature_method</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#signWithToken" title="details" class="method-name">signWithToken</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$token</span>)
									</div>
								</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">53</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Creates a request to be sent to an OpenSocial server.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">OpenSocialHttpRequest</span>
		<span class="method-name">
			__construct
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$method</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$url</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$signed_params</span> = <span class="var-default">null</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$body</span> = <span class="var-default">null</span>], <span class="var-type">body</span>&nbsp;<span class="var-name">$string</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$method</span><span class="var-description">: The HTTP method to use for this request.</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$url</span><span class="var-description">: The URL for this request.  Do not include querystring      parameters in this url because they will likely not be included      correctly when signing this request.</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$signed_params</span><span class="var-description">: An array of strings representing querystring      parameters that will be added to the url.  These parameters will be      included when signing the request.</span>			</li>
					<li>
				<span class="var-type">body</span>
				<span class="var-name">$string</span><span class="var-description">: The value of the request body.  This will not be      included when signing the request.</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$body</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetBody" id="getBody"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getBody</span> (line <span class="line-number">189</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the body of the current request or null if this is a GET.</p>
	<ul class="tags">
				<li><span class="field">return:</span> The request body or null.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getBody
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetHeaders" id="getHeaders"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getHeaders</span> (line <span class="line-number">205</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns an array of headers for this request.</p>
	<ul class="tags">
				<li><span class="field">return:</span> An array of header strings, one header per string.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			getHeaders
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetMethod" id="getMethod"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getMethod</span> (line <span class="line-number">161</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns a string indicating this request's HTTP method.</p>
	<ul class="tags">
				<li><span class="field">return:</span> One of &quot;GET&quot;, &quot;PUT&quot;, &quot;POST&quot;, &quot;DELETE&quot;, etc.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getMethod
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetNormalizedUrl" id="getNormalizedUrl"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getNormalizedUrl</span> (line <span class="line-number">181</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns a normalized URL without querystring parameters for the current  request.  This is to be mostly used for unit testing - if you want to get  an actual url to request, use the getUrl() method instead.</p>
	<ul class="tags">
				<li><span class="field">return:</span> A normalized URL without query parameters.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getNormalizedUrl
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetParameter" id="getParameter"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getParameter</span> (line <span class="line-number">103</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the value of the specified parameter.  Used for unit testing.</p>
	<ul class="tags">
				<li><span class="field">return:</span> The value of the parameter.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getParameter
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: The name of the parameter to retrieve.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetUrl" id="getUrl"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getUrl</span> (line <span class="line-number">169</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the url of the current request.</p>
	<ul class="tags">
				<li><span class="field">return:</span> The request url.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getUrl
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodsetParameter" id="setParameter"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setParameter</span> (line <span class="line-number">72</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets the specified parameter for this request.</p>
<p class="description"><p>The parameter will be included in the signature if this request is signed,  and will be passed as a query parameter regardless of the HTTP method used.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setParameter
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: The name of the parameter.</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$value</span><span class="var-description">: The value of the parameter.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetParameters" id="setParameters"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setParameters</span> (line <span class="line-number">82</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets multiple parameters for this request.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setParameters
		</span>
					(<span class="var-type">array</span>&nbsp;<span class="var-name">$parameters</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$parameters</span><span class="var-description">: An array of key value string pairs to assign      as parameters.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetRequestor" id="setRequestor"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setRequestor</span> (line <span class="line-number">94</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">For the two-legged OAuth case, some requests need a viewer context.  This  method assigns the appropriate VIEWER id to the xoauth_requestor_id  OAuth parameter.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setRequestor
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$id</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$id</span><span class="var-description">: ID of the VIEWER.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsign" id="sign"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">sign</span> (line <span class="line-number">113</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Signs the current request with the supplied credentials.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			sign
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$consumer</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$signature_method</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$consumer</span><span class="var-description">: The OAuthConsumer credential object.</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$signature_method</span><span class="var-description">: The OAuthSignatureMethod object indicating      which encryption method to use when signing this request.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsignWithToken" id="signWithToken"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">signWithToken</span> (line <span class="line-number">152</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Allows signing a request with a security token instead of OAuth.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			signWithToken
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$token</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$token</span><span class="var-description">: The security token to use.</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Wed, 17 Dec 2008 11:02:24 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
	</p>
	</div></body>
</html>